package com.aos.erp.schools.service.gatherschool;


import com.aos.erp.common.bean.IPageBean;
import com.aos.erp.common.exception.BizException;
import com.aos.erp.schools.model.gatherschool.entity.GatherSchool;
import com.aos.erp.schools.model.gatherschool.ro.DevRo;
import com.aos.erp.schools.model.gatherschool.ro.GatherSchoolRo;
import com.aos.erp.schools.model.gatherschool.ro.QueryGatherSchoolRo;
import com.aos.erp.schools.model.gatherschool.ro.UpdateGatherRo;
import com.aos.erp.schools.model.gatherschool.vo.*;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 总校 服务类
 * </p>
 *
 * @author chb
 * @since 2018-10-31
 */
public interface GatherSchoolService extends IService<GatherSchool> {


	GatherUserVo addGather(GatherSchoolRo gatherSchoolRo) throws Exception;

	int deleteGather(Long id) throws BizException;

	GatherInfoVo gatherInfo(Long id) throws BizException;

	//IPage<GatherSchool> queryByPage(Integer pageIndex, Integer pageSize, String code, String name, long provinceId, long cityId, long areaId, long divisionId);
	IPageBean<GatherListVo> queryByPage(QueryGatherSchoolRo queryGatherSchoolRo);
	List<GatherSchool> queryListVo(Map<String,Object> map);

	int updateGather(UpdateGatherRo updateGatherRo);

	List<ServiceGatherSchoolVo> querySchoolByCityId(List<Long>  cityIds);

	GatherSchool getGather(String currentUserId) throws Exception;

	UpdateGatherInfoVo updateInfo(long id) throws BizException;

	/**
	 * 根据驾校部门组织code查询驾校信息
	 * @param departmentCode  部门组织code
	 * @return
	 * @throws Exception
	 */
	GatherSchool queryByParams(String departmentCode) throws Exception;

	/**
	 * 根据用户ID查询驾校信息
	 * @param id  用户ID
	 * @return
	 * @throws Exception
	 */
	GatherSchool querySchoolByUserId(String id) throws Exception;


	List<TotalSchool> getTotalGather();

	List<TotalSchool> getBranch(String gatherId);

	GatherCodeNameVo getGatherCodeName(String gatherId) throws BizException;

	/**
	 * 根据驾校名称模糊查询驾校id和类型
	 * @param name 驾校名称
	 * @return
	 */
	List<GatherTypeVo> getGatherByName(String name);

	/**
	 * 查新树形结构
	 * @param currentUserId 登录用户ID
	 * @return
	 */
	List<SchoolTreeVo> getSchoolTree(Long currentUserId) throws Exception;

	List<GatherSchool> getSchoolByDev(DevRo devRo) throws BizException;
}
